|
A relational database management system uses SQL MERGE (also called ''upsert'') statements to INSERT new records or UPDATE existing records depending on whether or not a condition matches. It was officially introduced in the SQL:2003 standard, and expanded in the SQL:2008 standard.==Usage== Right join is employed over the Target (the INTO table) and the Source (the USING table / view / sub-query). That is: * If rows present in the Source but missing from the Target do run the action then specifically the NOT MATCHED action * If rows missing from the Source and present in Target are ignored then no action is performed on the Target. If multiple Source rows match a given Target row, an error is mandated by SQL:2003 standards. You cannot update a Target row multiple times with a MERGE statement 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Merge (SQL)」の詳細全文を読む スポンサード リンク
|